-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: always reset the state for Prepare and Process Proposal #15487
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was always the correct approach and ironically, this is simpler and cleaner 😆
Let's be sure to get a test for this and a changelog entry. We need to get this into v0.47.1 ASAP
// CometBFT must never call ProcessProposal with a height of 0. | ||
// Ref: https://github.com/cometbft/cometbft/blob/059798a4f5b0c9f52aa8655fa619054a0154088c/spec/core/state.md?plain=1#L37-L38 | ||
if req.Height < 1 { | ||
panic("ProcessProposal called with invalid height") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this check to be consistent with what we are doing on PrepareProposal
Co-authored-by: Marko <marbar3778@yahoo.com> (cherry picked from commit 3a7a264) # Conflicts: # CHANGELOG.md # baseapp/abci.go
## Describe your changes and provide context Similar changes to here: cosmos/cosmos-sdk#15487 Our fork of cosmos-sdk has a custom integration to get ABCI++ working so I'd like @codchen to take a second look ## Testing performed to validate your change Unit tests
## Describe your changes and provide context Similar changes to here: cosmos/cosmos-sdk#15487 Our fork of cosmos-sdk has a custom integration to get ABCI++ working so I'd like @codchen to take a second look ## Testing performed to validate your change Unit tests
Description
Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change